package com.example.demo.easyexcel.controller;

import com.example.demo.easyexcel.service.ModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zjq
 * @version 创建时间：2021-12-17 15:05:13
 */

@Api(tags = {"easyexcel模型"})
@RestController
@RequestMapping("/datastore")
public class ModelController {

    @Autowired
    private ModelService modelService;

    @ApiOperation(value = "最简单的写")
    @GetMapping("/model/xie")
    public void exportTemplate() {
        modelService.importTemplate();
    }

    @ApiOperation(value = "最简单的读")
    @GetMapping("/model/du")
    public void simpleRead() {
        modelService.exportTemplate();
    }

    @ApiOperation(value = "绍兴教师")
    @GetMapping("/model/dushaoxin")
    public void simpleReadShaoxingTeacher() {
        modelService.exportTemplates();
    }
}